#include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <map>
#include <unordered_map>
#include <unordered_set>
#include <set>
#include <bitset>
#include <utility>
using namespace std;

#define mm(a, n) memset(a, n, sizeof a)
#define mk(a, b) make_pair(a, b)

const double eps = 1e-6;
const int INF = 0x3f3f3f3f;

typedef long long LL;
typedef unsigned long long ULL;
typedef pair<int, int> PII;
typedef pair<LL, LL> PLL;
typedef pair<int, LL> PIL;

inline void quickread() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
}

const int N = 1010;

struct Record{
    string id;
    string passwd;
}record[N];

int n, idx;

inline void solution() {
    cin >> n;
    idx = 0;
    for (int i = 0; i < n; i ++ ) {
        string id, passwd;
        cin >> id >> passwd;
        bool flag = false;
        for (auto & x : passwd) {
            if (x == '1') x = '@', flag = true;
            else if (x == '0') x = '%', flag = true;
            else if (x == 'l') x = 'L', flag = true;
            else if (x == 'O') x = 'o', flag = true;
        }
        if (flag) 
            record[idx].id = id, record[idx ++ ].passwd = passwd;
        
    }

    if (idx) {
        cout << idx << endl;
        for (int i = 0; i < idx; i ++ ) {
            cout << record[i].id << " " << record[i].passwd << endl;
        }
    } else {
        if (n == 1) 
            cout << "There is 1 account and no account is modified" << endl;
        else
            cout << "There are " << n << " accounts and no account is modified" << endl;
    }
}

int main() {
    freopen("input.txt", "r", stdin);
    quickread();
    solution();
    return 0;
}